<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 字面量
        // let arr1 = [1, 100, true, "hello"];

        // for (let i = 0; i < arr1.length; i++) {
        //     console.log(arr1[i]);
        // }

        // for (let item of arr1) {
        //     console.log(item);
        // }

        // console.log(arr1[0]);
        // console.log(arr1[1]);
        // console.log(arr1[2]);
        // console.log(arr1[3]);


        // let arr2 = arr1;

        // console.log(arr1[3]);
        // console.log(arr1[6]);

        // arr1[0] = "a";
        // arr1[4] = "b";
        // arr1[6] = "你好";

        // delete arr1[3];

        // console.log(arr1, arr2);

        // arr1.length = 0;

        // console.log(arr1);






        // 构造函数
        // let arr2 = new Array();

        // console.log(arr1, arr2);




        let arr = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];

        for (let i = 0; i < arr.length; i++) {

            for (let j = 0; j < arr[i].length; j++) {
                console.log(arr[i][j]);
            }

        }

        // console.log(arr[0][2]);


    </script>
</body>

</html>